package com.hand.prantice.ssm.config;

import com.hand.prantice.ssm.interceptor.Controllerinterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 马旭阳
 * @date2019/7/17
 */
@Configuration
public class webConfig implements WebMvcConfigurer {
    @Autowired
    private Controllerinterceptor controllerinterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(controllerinterceptor).addPathPatterns("/**");
    }
}
